import 'package:json_annotation/json_annotation.dart';

part 'comic_user_model.g.dart';

@JsonSerializable()
class UserData {
  final String? id;
  final String? key;
  final String? avatar;
  final String? nickname;
  final String? sign;
  final String? account;
  final String? email;
  final int? sex;
  final int? age;
  final String? birthday;
  final int? vipStatus;
  final DateTime? vipExpDate;
  final int? progress;
  final DateTime? lastEditDate;
  final DateTime? lastOnlineDate;
  final DateTime? lastLoginDate;
  final int? isOnline;
  final List<String>? tag;
  final int? balance;
  final String? source;
  final String? inviteCode;
  final int? status;
  final String? countryCode;
  final int? isSystem;
  final DateTime? createTime;
  final double? lng;
  final double? lon;
  final String? ip;

  UserData({
    this.id,
    this.key,
    this.avatar,
    this.nickname,
    this.sign,
    this.account,
    this.email,
    this.sex,
    this.age,
    this.birthday,
    this.vipStatus,
    this.vipExpDate,
    this.progress,
    this.lastEditDate,
    this.lastOnlineDate,
    this.lastLoginDate,
    this.isOnline,
    this.tag,
    this.balance,
    this.source,
    this.inviteCode,
    this.status,
    this.countryCode,
    this.isSystem,
    this.createTime,
    this.lng,
    this.lon,
    this.ip,
  });

  factory UserData.fromJson(Map<String, dynamic> json) =>
      _$UserDataFromJson(json);

  Map<String, dynamic> toJson() => _$UserDataToJson(this);
}
